<?

class fix_permissions_task extends system_task
{
	public function execute( array $params = array() )
	{
		echo '.';
		exec('chmod 777 ' . PROJECT_PATH . '/apps/main/web/public');

		echo '.';
		exec('chmod 777 ' . PROJECT_PATH . '/apps/main/web/public/*');

		echo '.';
		exec('chmod 777 -R ' . PROJECT_PATH . '/data/cache');

		echo '.';
		exec('chmod 777 -R ' . PROJECT_PATH . '/data/i18n');

		$this->out();
		$this->out('Permissions were set successfully');
	}
}